package com.kexilo.core.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.kexilo.core.common.core.domain.BaseEntity;
import com.kexilo.core.common.validation.UpdateGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;


/**
 * 字典类型表 kx_sys_dict_type
 * 
 * @author Kexilo
 */
@TableName("kx_sys_dict_type")
public class SysDictType extends BaseEntity {
    
    private static final long serialVersionUID = 1L;

    /** 字典主键 */
    @TableId(type = IdType.AUTO)
    @NotNull(message = "字典类型ID不能为空", groups = { UpdateGroup.class })
    private Long dictId;

    /** 字典名称 */
    @NotBlank(message = "字典名称不能为空")
    @Size(max = 100, message = "字典类型名称长度不能超过100个字符")
    private String dictName;

    /** 字典类型 */
    @NotBlank(message = "字典类型不能为空")
    @Size(max = 100, message = "字典类型类型长度不能超过100个字符")
    private String dictType;

    /** 状态（0正常 1停用） */
    private String status;

    /** 备注 */
    private String remark;

    public SysDictType() {

    }

    public SysDictType(String dictType) {
        this.dictType = dictType;
    }
    
    // Getter methods
    public Long getDictId() {
        return dictId;
    }
    
    public String getDictName() {
        return dictName;
    }
    
    public String getDictType() {
        return dictType;
    }
    
    public String getStatus() {
        return status;
    }
    
    public String getRemark() {
        return remark;
    }
    
    // Setter methods
    public void setDictId(Long dictId) {
        this.dictId = dictId;
    }
    
    public void setDictName(String dictName) {
        this.dictName = dictName;
    }
    
    public void setDictType(String dictType) {
        this.dictType = dictType;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        
        SysDictType that = (SysDictType) o;
        
        return dictId != null ? dictId.equals(that.dictId) : that.dictId == null;
    }
    
    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (dictId != null ? dictId.hashCode() : 0);
        return result;
    }
}
